<template>
	<view class="flex-col homepage">
		<view class="ss">
			<u-search placeholder="请输入小区名字" class="ssuo" height="50" v-model="keyword"></u-search>
		</view>
		<view class="c" v-for="(j, index) in CommunityList" :key="index" @click="gotoInfo(j)">
			<view class="c1">
				{{j.address}}
				<uni-icons style="float: right;" type="forward" size="15"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				CommunityList:[],
				user:{}
			}
		},
		onLoad() {
			this.ListAll()
		},
		methods: {
			ListAll() {
				this.user = uni.getStorageSync('user')
				this.$axios({
					url: 'serverwg/gwb/AddmainList',
					data: {
						id: this.user.userId,
					},
					method: 'GET',
					success: (res) => {
						this.CommunityList=res.data.data.Maintenance
					}
				})
			},
			gotoInfo(j){
				console.log(j)
				uni.navigateTo({
					url: '/pages/gwb/AddmainTenance?j=' + JSON.stringify(j)
				})
				
			},
		}
	}
</script>

<style lang="scss" scoped>
	.ss {
		width: 700rpx;
		margin: 20rpx auto;
	}

	.c {
		width: 90%;
		height: 100rpx;
		border-bottom: #c8c9cc 1px solid;
		margin: 0 auto;
	}

	.c1 {
		float: left;
		width: 98%;
		height: 100rpx;
		font-size: 32rpx;
		line-height: 110rpx;
		margin-left: 10rpx;
	}

	.ssuo {
		background: #f4f4f5;
		border: #c8c9cc 1px solid;
		border-radius: 60rpx;
	}

	.homepage {
		padding: 0rpx 0rpx 100rpx 0rpx;
		border-color: rgba(210, 210, 210, 1);
		font-weight: 500;
		background: #dbf1e1;
		height: 1500rpx;
	}
</style>
